<!--  -->
<template>
  <el-container>
    <el-header>
      <main-header></main-header>
    </el-header>
    <el-backtop target=".el-main" :style="{ right: '60px', bottom: '80px' }"></el-backtop>
    <el-main>
      <el-row :gutter="10">
        <el-col :xs="0" :sm="1" :md="1" :lg="2" :xl="3">
          <span>&nbsp;</span>
        </el-col>

        <el-col :xs="24" :sm="22" :md="22" :lg="20" :xl="18" style="padding:0 20px">
          <!-- content主内容区 -->
          <router-view />
        </el-col>

        <el-col :xs="0" :sm="1" :md="1" :lg="2" :xl="3">
          <span>&nbsp;</span>
        </el-col>
      </el-row>
    </el-main>
    <el-footer>
      <main-footer></main-footer>
    </el-footer>
  </el-container>
</template>

<script>
import MainHeader from "./main-header";
import MainContent from "./main-content";
import MainFooter from "./main-footer";

export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    MainHeader,
    MainContent,
    MainFooter,
  },
  data() {
    //这里存放数据
    return {
      active: "main-content",
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {},
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {
    this.$router.push({
      path: this.active,
    });
  },
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {}, //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>
<style scoped>
/* 隐藏滚动条 */
::-webkit-scrollbar {
  width: 0 !important;
}
::-webkit-scrollbar {
  width: 0 !important;
  height: 0;
}
.el-main {
  background-color: #eff4ff;
}
.el-container {
  height: 100vh;
}
.el-footer {
  text-align: center;
  color: white;
  background-color: #606266;
  line-height: 60px;
}

.el-carousel__item:nth-child(n) {
  background-color: #99a9bf;
  border-radius: 6px;
}
</style>